home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Games / Xconq 7.1.0 / src / xconq-7.1.0 / doc / x11-sect.texi < prev    next >
Encoding:
Text File  |  1996-07-07  |  16.6 KB  |  495 lines  |  [TEXT/R*ch]

  1. @node Introduction to X11 Xconq, Playing X11 Xconq, Playing Xconq, Playing Xconq
  2.  
  3. @section Introduction to X11 Xconq
  4.  
  5. @i{Xconq} includes an interface to the X Window System.  Since it is
  6. only for version 11 of X, we will call it @i{X11 Xconq}.  The interface
  7. is graphical, can work with either monochrome or color displays, and is
  8. capable of opening multiple displays, one for each player, if desired.
  9. It uses the Xt toolkit and Athena widgets.
  10.  
  11. @menu
  12. * Installing X11 Xconq::
  13. * Playing the Introductory Game with X11 Xconq::  
  14. @end menu
  15.  
  16. @node Installing X11 Xconq, Playing the Introductory Game with X11 Xconq, Introduction to X11 Xconq, Introduction to X11 Xconq
  17.  
  18. @subsection Installing X11 Xconq
  19.  
  20. The usual @samp{make} and @samp{make install} will generate and install
  21. the executable and library into @file{usr/games/bin} and
  22. @file{usr/games/lib/xconq}, respectively.  (See the file @file{INSTALL}
  23. in the main source directory for more detailed instructions.)
  24.  
  25. The name of the executable is @file{xconq}.
  26.  
  27. @c need more when fonts used again
  28.  
  29. @c As with most X programs, you can customize @i{X11 Xconq} by using
  30. @c resources.
  31.  
  32. @node Playing the Introductory Game with X11 Xconq, , Installing X11 Xconq, Introduction to X11 Xconq
  33.  
  34. @subsection Playing the Introductory Game with X11 Xconq
  35.  
  36. To begin an introductory game, give the command @samp{xconq -g intro}.
  37.  
  38. @node Playing X11 Xconq, Troubleshooting X11 Xconq, Introduction to X11 Xconq, Playing Xconq
  39.  
  40. @section Playing X11 Xconq
  41.  
  42. @menu
  43. * Starting a New Game::
  44. * Maps::
  45. * Play::
  46. @end menu
  47.  
  48. @node Starting a New Game, Maps, , Playing X11 Xconq
  49.  
  50. @subsection Starting a New Game
  51.  
  52. To play @i{X11 Xconq}, just type @samp{xconq}.  You will get the default
  53. game, which has you and a single AI as the two opposing players, in a
  54. randomly generated 60x30 area that is mostly unexplored.  The game
  55. design in effect is called @samp{standard}.  It is a generic ``Empire''
  56. type game, with cities, armies, airplanes, and ships of various types.
  57.  
  58. If you're new to @i{Xconq}, and find that @samp{standard} is too
  59. complicated and/or confusing, try the introductory game @samp{intro}
  60. instead; type @samp{xconq -g intro} to get it.  @samp{intro} is
  61. generally like @samp{standard}, but it has fewer types of units and
  62. terrain, you start with only one city, the one city is preset to build
  63. armies, there is more land, and the other player starts closer.  Note
  64. that some of these changes mean that luck plays a larger role in
  65. determining whether you win or lose; so if you find yourself losing, it
  66. may only be because your starting position was poor.  Success in the
  67. standard game, however, depends almost entirely on skill, so play it
  68. when you're more experienced with @i{Xconq}.
  69.  
  70. By default, the X11 interface opens up windows on the display named in
  71. the environment variable @code{DISPLAY}, and connects it with the first
  72. side and player in the game.
  73.  
  74. @menu
  75. * Xconq Command Options::
  76. * New Game Dialogs::
  77. @end menu
  78.  
  79. @node Xconq Command Options, New Game Dialogs, Starting a New Game, Starting a New Game
  80.  
  81. @subsubsection Xconq Command Options
  82.  
  83. The arguments to an @i{Xconq} command consist of a list of player specifications
  84. and possibly some additional options.
  85.  
  86. @table @code
  87.  
  88. @item [@var{name}][,@var{ai}][/@var{config}][@@@var{display}][+@var{adv}]
  89. Attempt to open a display on @var{display} and assign a player/side to it.
  90. Options include naming the player @var{name}, adding an AI of type
  91. @var{ai}, using the side config file @i{config}
  92. and asking for an advantage of @var{adv}.
  93. @var{adv} defaults to 1.
  94. If @var{name} is not supplied, then @var{name}
  95. is assumed to be the display name. 
  96. A display named just @code{"_"} is equivalent to the default display,
  97. as in the value of the environment variable @code{DISPLAY}.
  98.  
  99. @end table
  100.  
  101. You can get a variety of uses out of player specs.  For instance,
  102. the player spec @code{,ai+4} asks for an AI, of a default type
  103. appropriate to its side, with a starting advantage of 4.
  104. If you want to give yourself an advantage, just specify @code{+4}
  105. anywhere on the command line.
  106.  
  107. The following options are always available:
  108.  
  109. @table @code
  110.  
  111. @item -c @var{n}
  112. Write a checkpoint every @var{n} turns.
  113.  
  114. @item -design
  115. Make every side in the game be a designer.
  116.  
  117. @item -e[,@var{ai}][+@var{adv}] @var{n}
  118. Create @var{n} sides and AIs to play them, using the optional @var{ai}
  119. and @var{adv} to set the AI type and advantage of each.
  120.  
  121. @item -f @var{filename}
  122. Play the game found in @var{filename}.
  123.  
  124. @item -g @var{gamename}
  125. Play the game @var{gamename}, if one by that
  126. name exists in the library (the default, or
  127. the location specified with @code{-L}.
  128.  
  129. @item -h @var{n}
  130. Wait for @var{n} human players to join.
  131. [not yet implemented]
  132.  
  133. @item -help, --help
  134. List all of the options.
  135. If a game was loaded using @code{-g} or @code{-f},
  136. also list all of the variants for the game.
  137.  
  138. @item -join
  139. Connect to a game named \fIgame\fP.
  140. [not yet implemented]
  141.  
  142. @item -L @var{directory}
  143. Search in @var{directory} for game modules.
  144.  
  145. @item -mail
  146. Arrange to run the game as play-by-email.
  147. If you use this option, each player must be given both a name
  148. and host, in the form of an Internet address.
  149. [not yet implemented]
  150.  
  151. @item -r
  152. Do not add a player on a local display.
  153. If you use this, you must list every player on the
  154. command line explicitly.
  155.  
  156. @item -w
  157. Suppress warnings.
  158.  
  159. @item -wait
  160. [not yet implemented]
  161.  
  162. @item --version
  163. Display version information.
  164.  
  165. @item -x
  166. Bring up a set of new game, variant, and player setup dialogs.
  167.  
  168. @end table
  169.  
  170. The following options only work if the game allows for the
  171. corresponding variants:
  172.  
  173. @table @code
  174.  
  175. @item -M @var{width}[x@var{height}][W@var{circumf}][+@var{lat}][+@var{lon}]
  176. Set the size and position of the game area If only @var{width} is given,
  177. then the @var{height} defaults to the same as @var{width}.
  178. Circumference defaults to 360, @var{lat} and @var{lon} default to 0.
  179. The name of the variant is @code{world-size}.
  180.  
  181. @item -sq
  182. Set sides to move in sequence, one at a time.
  183. The variant is @code{sequential}, with a value of 1.
  184.  
  185. @item -sm
  186. Set sides to all move simultaneously.
  187. The variant is @code{sequential}, with a value of 0.
  188.  
  189. @item -t
  190. Set realtime variants.
  191.  
  192. @item -v
  193. Set the world to have been seen already.
  194. The variant is @code{world-seen}, with a value of 1.
  195.  
  196. @item -V
  197. Set everything to be seen all the time.
  198. The variant is @code{see-all}, with a value of 1 (@code{true}).
  199. If @code{see-all} defaults to being true for a game,
  200. then you can make it false by using @code{-vsee-all=false}
  201. or @code{-vsee-all=0}.
  202.  
  203. @item -v[@var{name}][=@var{value}]
  204. Set the variant named @var{name} to have the value @var{value}.  If the
  205. @var{value} is not supplied, it defaults to 1 (@code{true}).
  206.  
  207. @item -vhelp
  208. Display variant help info.
  209. This lists the available variants as @code{-help} does.
  210.  
  211. @end table
  212.  
  213. If debugging has been compiled in, then the options @code{-D}
  214. and @code{-R} are also available.
  215. See the hacking chapter of the manual for more detail.
  216.  
  217. The following options apply only to the default X11 display:
  218.  
  219. @table @code
  220.  
  221. @item -bg @var{color}
  222.  
  223. @item -display @var{displayname}
  224.  
  225. @item -fg @var{color}
  226.  
  227. @item -geometry @var{geometry}
  228.  
  229. @item -name @var{name}
  230.  
  231. @end table
  232.  
  233.  
  234. @node New Game Dialogs,  , Xconq Command Options, Starting a New Game
  235.  
  236. @subsubsection New Game Dialogs
  237.  
  238. If you give the command line option @code{-x}, @i{Xconq} will
  239. display a series of dialogs that you can use to set up a game
  240. interactively.
  241.  
  242. @node Maps, Play, Starting a New Game, Playing X11 Xconq
  243.  
  244. @subsection Maps
  245.  
  246. Once the game has started, you have at least one ``map window'' open.
  247. (For brevity, these can be called just ``maps'').
  248. Each map window has identical capabilities, so you can play by using
  249. just one, or have one for each area of interest, or have some of them serve
  250. specialized purposes.
  251. For instance, you can have a map window that shows the entire world.
  252.  
  253. @menu
  254. * Map Parts::
  255. * Scrolling Maps::
  256. * View Control Popup::
  257. @end menu
  258.  
  259. @node Map Parts, Scrolling Maps, Maps, Maps
  260.  
  261. @subsubsection Map Parts
  262.  
  263. Each map window consists of a number of panes, whose size you may
  264. adjust by dragging the small square grips that may be seen on the
  265. the pane boundaries.
  266.  
  267. @example
  268. ----------------------------------------------------------
  269. |                                     |                  |
  270. |           history/notices           |                  |
  271. |                                     |                  |
  272. |-------------------------------------|     sides        |
  273. |           command prompt            |                  |
  274. |-------------------------------------|                  |
  275. |             turn/date               |------------------|
  276. |-------------------------------------|                  |
  277. |       |                             |                  |
  278. |       |      unit/cell info         |                  |
  279. |       |                             |                  |
  280. |       |-----------------------------|                  |
  281. |       |                             |    unit types    |
  282. |       |                             |                  |
  283. | ctrl  |                             |                  |
  284. | panel |                             |                  |
  285. |       |                             |                  |
  286. |       |         map view            |                  |
  287. |       |                             |                  |
  288. |       |                             |------------------|
  289. |       |                             |                  |
  290. |       |                             |                  |
  291. |       |                             |     panner       |
  292. |       |                             |                  |
  293. |       |                             |                  |
  294. ----------------------------------------------------------
  295. @end example
  296. @c should prevent break across pages here
  297.  
  298. The map view is the actual display of the world.
  299.  
  300. Each map may have one @i{current position} and one @i{current unit}.
  301. The current position is specially highlighted, and the info subwindow
  302. displays information about it.  If in addition there is a current
  303. unit at the current position, then it will be highlighted rather
  304. than the entire cell, and the info pane will describe it
  305. in detail.
  306.  
  307. The info pane has the general form
  308. @example
  309. <unit owner, type, name>       <hp> <acp>|<cp> <cxp>
  310. <location>
  311. <occupants>                    <supply>
  312. <plan>                         <more supply>
  313. <tasks>
  314. @end example
  315. Items like @code{<hp>} and @code{acp} have the form
  316. @code{@var{current}/@var{max}}, so that you can get an idea
  317. of how the value compares to what it could be.
  318.  
  319. @node Scrolling Maps, View Control Popup, Map Parts, Maps
  320.  
  321. @subsubsection Scrolling Maps
  322.  
  323. It will nearly always be the case that the world is too large to be seen
  324. all at once.  You can scroll around in two ways.  First, if you are in
  325. survey mode, and click near any edge of the view, @i{Xconq} will put the
  326. position you clicked at the center of the view.  By clicking in the same
  327. place repeatedly, you can ``walk'' the view in any desired direction.
  328.  
  329. If you want to go directly to a particular part of the world, use the
  330. panner in the bottom right corner of the map window.  To use the panner,
  331. click and drag the shadowed box inside the panner.  The panner is sized
  332. to match the map, and the shadowed box is sized to match the view, so
  333. you can get a general idea of of where the map is within the world.
  334.  
  335. @node View Control Popup,  , Scrolling Maps, Maps
  336.  
  337. @subsubsection View Control Popup
  338.  
  339. If you click the button labelled ``More...'' in the leftside controls,
  340. you will get a popup dialog that is a full set of viewing controls.
  341. Unlike the leftside view controls, these do not act at once; instead,
  342. you toggle them on or off, then click on ``Apply'' or ``Done'' to see
  343. the effects.  This allows you to make a number of changes, but only
  344. redraw the map once when you are ready to see the results.  ``Apply''
  345. leaves the popup in place, while ``Done'' makes it go away.  You can
  346. leave the popup up permanently and continue play, if you like.
  347.  
  348. Note that each map will have its own separate view control popup, and
  349. that they're not clearly distinguished from each other.  Fortunately,
  350. these only affect display, not the game itself.
  351.  
  352. @node Play,  , Maps, Playing X11 Xconq
  353.  
  354. @subsection Play
  355.  
  356. The basic idea of play is to be in move mode, let the program select the
  357. next unit to do something, then give it a command, either by clicking
  358. the mouse or by typing on the keyboard.
  359.  
  360. Each map may be in either survey or move mode (@xref{Modes})
  361. independently of the others.  In survey mode, the default actions are
  362. not to do anything, while in move mode, the default actions are to do
  363. things.  This principle applies to both mouse and keyboard commands.
  364. For instance, 'h' in survey mode moves the current position west by one
  365. cell, but in move mode it causes the current unit to try to move west by
  366. one cell.
  367.  
  368. @menu
  369. * Using the Mouse::
  370. * Using the Keyboard::
  371. * Saving and Restoring Games::
  372. @end menu
  373.  
  374. @node Using the Mouse, Using the Keyboard, Play, Play
  375.  
  376. @subsubsection Using the Mouse, excuse me, Pointer
  377.  
  378. Although in classic X style, all the actions may be arbitrarily
  379. rebound, for simplicity the default @i{Xconq} setup uses the
  380. left button for the most important actions.
  381.  
  382. @node Using the Keyboard, Saving and Restoring Games, Using the Mouse, Play
  383.  
  384. @subsubsection Using the Keyboard
  385.  
  386. The general commands (@xref{Standard Keyboard Commands}) all work.
  387.  
  388. Commands that operate on units will be applied to the current unit
  389. of the map.  If the map has no current unit, then you will get an error message.
  390.  
  391. Commands that need further input will generally request it from
  392. the prompt subwindow that is sandwiched between the history subwindow
  393. and the date subwindow.  You do not need to put the cursor over
  394. the prompt window to type into it however; when a prompt is up,
  395. any typed characters will be considered to be part of the answer
  396. to the prompt.
  397. You can type in an escape (@samp{C-[}) character to cancel the
  398. command and clear the prompt.
  399.  
  400. If the request is for a unit type, such as when choosing a type
  401. to construct,
  402. you can choose the type either by typing its character,
  403. or by clicking on its entry in the unit type list.
  404.  
  405. The X11 interface defines these additional commands.
  406.  
  407. @table @code
  408.  
  409. @item @code{ v }
  410. (@code{flash}).  Highlight the position of the current unit.
  411.  
  412. @item @code{ @{ }
  413. (@code{z-in}) Zoom in (cells appear larger).
  414.  
  415. @item @code{ @} }
  416. (@code{z-out}) Zoom out (cells appear smaller).
  417.  
  418. @end table
  419.  
  420. @table @code
  421.  
  422. @item @code{close}
  423. Close a map window.
  424.  
  425. @item @code{map}
  426. Open a new map window.
  427.  
  428. @item @code{rv}
  429. Switch to reverse video.
  430.  
  431. @item @code{orders}
  432. Popup a dialog for setting standing orders.
  433.  
  434. @item @code{side}
  435. Open a closeup of the side.
  436.  
  437. @item @code{unit}
  438. Open a closeup of the current unit.
  439.  
  440. @item @code{world-map}
  441. Open a world map window.
  442. @ifset FULL
  443. This is like @code{map}, but the map is scaled to show the whole world
  444. at once.
  445. @end ifset
  446.  
  447. @item @code{mono}
  448. Switch to monochrome display. (debugging)
  449. @ifset FULL
  450. This is really meant for debugging only,
  451. and is only available if debugging was compiled in.
  452. @end ifset
  453.  
  454. @end table
  455.  
  456. @node Saving and Restoring Games,  , Using the Keyboard, Play
  457.  
  458. @subsubsection Saving and Restoring Games
  459.  
  460. The save command @samp{S} saves games to @samp{save.xconq}.  The saved
  461. game is a normal text file.  To restore the game, give the command
  462. @samp{xconq -f save.xconq}.  The saved game preserves all of the
  463. player information, including display names, so the restored game
  464. will use all of the same displays as before.
  465.  
  466. You can change which displays go with which sides by using @code{-r}
  467. to suppress the addition of a default player, and listing all of the
  468. players explicitly, in the order desired.  For instance, suppose that
  469. the original 5-player game was started with the arguments
  470. @code{foo:0.0 joe@@bar:0.0 -e 2}, then to just change the displays,
  471. restore with
  472. @code{-f save.xconq -r baz:0.0 weeble:0.0 joe@@andros:0.0}.
  473. This puts the original person who started the game onto @code{baz:0.0},
  474. and the other two humans on @code{weeble:0.0} and @code{andros:0.0},
  475. while leaving the two AIs unaffected.
  476.  
  477. This ability is also useful for swapping sides, although it can be
  478. tricky to get right.  For instance,
  479. @code{-f save.xconq -r ,ai ,ai ,ai ,@@foo:0.0 joe,@@bar:0.0}
  480. restores the game, but gives the first three sides to the default
  481. AI, and the last two (which had been played by AIs) to humans, and
  482. disables the AIs that had been running them.  (The @code{,@@} sequence
  483. effectively asks for an AI with an empty type name, which is interpreted
  484. to mean ``no AI''; otherwise the displays would have been opened, with
  485. an AI moving the units.)
  486.  
  487. @node Troubleshooting X11 Xconq, , Playing X11 Xconq, Playing Xconq
  488.  
  489. @section Troubleshooting X11 Xconq
  490.  
  491. By far the most common problem with the X11 interface is setting up a
  492. game with multiple displays.  Future versions of @i{Xconq} will allow
  493. for players to come in at their leisure, but for now every display must
  494. be specified during startup.
  495.